1. Field of the Invention
The present invention relates to coding and decoding method and device, and, in particular, coding and decoding method and device on multi-level images, in a digital copying machine or the like, especially for the purpose of image compression and decompression
2. Description of the Related Art
There are tendencies, such as improving the resolution in digital apparatus in recent years for providing high-definition images and increasing the number of gray scale levels thereon. This results in an effect of improving image quality, but thereby, the amount of information to be processed increases accordingly. In fact, as an image of the 256 gray scale levels of monochrome is discussed, the information amount 8 times a case of two gray scale levels (black and white) should be processed. Accordingly, a storage capacity needed in order to memorize the image as a result becomes also 8 times, and, thus, the cost of image-processing apparatus will increase accordingly.
Then, a scheme of coding (compressing) image data is usually applied for reducing the size of the necessary storage capacity. The coding scheme is roughly classified into a variable-length coding and fixed-length coding in terms of a code word length obtained after the coding. The former scheme has a feature such that coding efficiency is high, and also, lossless compression is achieved. On the other hand, according to the second scheme, i.e., the fixed-length coding, since a position on an image before coding can be recognized after the coding. Thereby, it is possible to reproduce only image of arbitrary portions from the coded data. Accordingly, the former is suitable for apparatus like a facsimile machine from these features, and the latter is suitable for an apparatus for which image processing/manipulation/modification is required, such as a copying machine, etc.
The fixed-length coding scheme suitable for a copying machine etc. will now be discussed. In this scheme, the easiest way is to fix the length of code word assigned to 1 pixel. For example, a 2-bit-per-1-pixel code word is applied to 1 pixel originally having 8 bits. However, by this way, a partial feature which an original image has cannot necessarily be reflected by the thus-obtained code. Since, in other words, an important image region and an image region which is not so cannot be distinguished in coding scheme, quality of image may be degraded as a result of the coding.
In order to improve the quality of image, the number of bits assigned to 1 pixel must be increased, but, thereby, the coding efficiency becomes bad. Moreover, a region of characters, a region of a natural image, etc. may be mixed in one page of image, in some cases. In such a case, when various these regions having different features are processed by the same coding scheme, the original image information is not kept but the image quality may be deteriorated.